<!--滚动条效果-->
<link type="text/css" rel="stylesheet" media="all" href="/static/course-side/css/index.css">
<script type="text/javascript" charset="utf-8" src="/static/course-side/js/jquery/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/course-side/js/mousewheel/mousewheel.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/course-side/js/easyscroll.js"></script>
<script type="text/javascript">
    $(function(){$('.div_scroll').scroll_absolute({arrows:true})});
</script>

<!--多级手风琴-->
<link rel="stylesheet" href="/static/course-side/css/reset.css">
<link rel="stylesheet" href="/static/course-side/css/style.css">
<script src="/static/course-side/js/modernizr.js"></script>
<link rel="stylesheet" type="text/css" href="/static/course-side/css/default.css">


<div class="container1">

<div class="div_scroll">

<p>
<ul class="cd-accordion-menu animated">
    <?php $i=0 ?>
    <?php  foreach ($course as $sec_key => $section) {?>
    <li class="has-children">
        <input type="checkbox" name="group-<?php echo $sec_key+1; ?>" id="group-<?php echo $sec_key+1; ?>" checked>
        <label for="group-<?php echo $sec_key+1; ?>">第 <?php echo $sec_key+1; ?> 章：　<?php echo $section['section_name'] ?></label>
        <?php if (!empty($section['joint'])) { ?>
            <ul>
          <?php foreach ($section['joint'] as $j_key => $joint) { ?>
            <?php $i=$i+1; ?>
            <li class="has-children">
                <input type="checkbox" name="sub-group-<?php echo $i ?>" id="sub-group-<?php echo $i ?>">
                <label for="sub-group-<?php echo $i ?>">第 <?php echo $j_key+1 ?> 节：<?php echo $joint['joint_name'] ?></label>
                <?php if (!empty($joint['period'])) { ?>
                <ul style="display: block; overflow: hidden;">
                <?php foreach ($joint['period'] as $p_key => $period) {
                    if ($period['movie_name']) {
                        $url = "/index.php/course/play-movie?course_id=$course_id&period_id=".$period['period_id'];
                    }else{
                        $url = "javascript:void(0);";
                        }
                    if ($type_id == 11 && !$period['movie_name']) {
                        $con = "(".date('m月d日H点i分',$period['open_time'])."直播)";
                    }elseif($type_id !=11 && !$period['movie_name']){
                        $con = "(暂无视频)";
                    }
                    ?>
                    <li><a href=<?php echo $url ?> <?php if(!$period['movie_name'])echo "disabled=true"; ?> target="_top">课时<?php echo $p_key+1; ?>:<?php echo $period['period_name'] ?><?php echo $con ?></a></li>
                <?php } ?>
                </ul>
                <?php } ?>
            </li>
        <?php } ?>
        </ul>
        <?php } ?>
    </li>
    <?php } ?>
<!--
    <li class="has-children">
        <input type="checkbox" name="group-2" id="group-2">
        <label for="group-2">Group 2</label>

        <ul>
            <li><a href="#0">Image</a></li>
            <li><a href="#0">Image</a></li>
        </ul>
    </li>

    <li class="has-children">
        <input type="checkbox" name="group-3" id="group-3">
        <label for="group-3">Group 3</label>

        <ul>
            <li><a href="#0">Image</a></li>
            <li><a href="#0">Image</a></li>
        </ul>
    </li>

    <li class="has-children">
        <input type="checkbox" name="group-4" id="group-4">
        <label for="group-4">Group 4</label>

        <ul>
            <li class="has-children">
                <input type="checkbox" name="sub-group-3" id="sub-group-3">
                <label for="sub-group-3">Sub Group 3</label>

                <ul>
                    <li><a href="#0">Image</a></li>
                    <li><a href="#0">Image</a></li>
                </ul>
            </li>
            <li><a href="#0">Image</a></li>
            <li><a href="#0">Image</a></li>
        </ul>
    </li> -->
</ul> <!-- cd-accordion-menu -->
</p>
</div>

<script src="/static/course-side/js/main.js"></script>